package com.ericsson.rm.validator;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import org.springframework.validation.Errors;
//import org.springframework.validation.ValidationUtils;

import com.ericsson.rm.form.FileUploadCommand;


@Component
public class FileUploadValidator {
	private final static Logger logger = LoggerFactory.getLogger(FileUploadValidator.class);
	private final static String CLASS_NAME = FileUploadValidator.class.getSimpleName();
	
	public boolean supports(Class cls)
	{
		return FileUploadCommand.class.isAssignableFrom(cls);
	}
	
	public void validate(Object target, Errors errors)
	{
		/*final String METHOD_NAME = CLASS_NAME +".validate()";
		if(logger.isDebugEnabled())
			logger.debug(METHOD_NAME+"entering...");
	
	ValidationUtils.rejectIfEmptyOrWhitespace(errors, "fromDate", "required.fromDate", "Field name is required.");
	ValidationUtils.rejectIfEmptyOrWhitespace(errors, "toDate", "required.toDate", "Field name is required.");	*/	

	}

}
